from urllib.request import urlopen
from bs4 import BeautifulSoup
from Ball import Ball


myBall=Ball("red","big","Down")
print(myBall.size)
print(myBall.direction)
myBall.bounce()
print(myBall.direction)
print(myBall)

try:
    html=urlopen("http://www.baidu.com");
    bsobj=BeautifulSoup(html.read(),"html.parser")
except HTTPError as e:
    print(e);
else:
    try:
       print(bsobj.iframe.txt.rt);
    except AttributeError as e:
        print(e)
